package com.android.fragmentdemo.fragments
import androidx.lifecycle.ViewModelProvider
import android.os.Bundle
import android.util.Log
import android.view.View
import com.android.fragmentdemo.R
import com.hengfoxwolf.commonbase.base.BaseFragment
import com.android.fragmentdemo.databinding.FragmentCategoryBinding

class CategoryFragment : BaseFragment<FragmentCategoryBinding>() {

    private lateinit var viewModel: CategoryViewModel

    override fun getLayoutId() = R.layout.fragment_category

    override fun init(savedInstanceState: Bundle?) {


    }

    override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
        super.onViewCreated(view, savedInstanceState)
        viewModel = ViewModelProvider(this)[CategoryViewModel::class.java]
    }

    override fun onHiddenChanged(hidden: Boolean) {
        super.onHiddenChanged(hidden)
        Log.d(TAG, "222->${TAG}--${hidden}")
    }

    companion object {
        private const val TAG = "CategoryFragment"
        fun newInstance() = CategoryFragment()
    }
}